<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>统战成员学习平台</title>
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
</head>

<body class="white">
    <header class="white red" id='app' style="display:none" v-show="true">
        <div class="ui_border_b point_tab">
            <span tapmode onclick="closeWin()" class="left"><i class="icon_back_white"></i></span>
            <ul>
                <li :class="{'active' : type===0}" @click="switchTab(0)">等级说明</li>
                <li :class="{'active' : type===1}" @click="switchTab(1)">积分规则</li>
            </ul>
            <span tapmode onclick="openWin('point_rule_win')" class="right"></span>
        </div>
    </header>

    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/vue.min.js"></script>
    <script type="text/javascript" src="../../script/common.js"></script>
    <script type="text/javascript" src="../../script/layer_mobile/layer.js"></script>
    <script type="text/javascript">
        new Vue({
            el: '#app',
            data: {
                type: 0,
                frames: [{
                    name: '等级说明',
                    url: 'point_level_frm'
                }, {
                    name: '积分规则',
                    url: 'point_rule_frm'
                }]
            },
            mounted: function() {
                var $this = this;
                apiready = function() {
                    api.parseTapmode();

                    $this.frames.forEach(function(item, index) {
                        openfrmFromWin({
                            frmName: item.url,
                            bounces: true
                        });
                        api.setFrameAttr({
                            name: item.url,
                            hidden: true
                        });
                    })
                    $this.init();
                    if(api.systemType!='ios'){
                      setTimeout(function(){
                        $this.switchTab($this.type);
                      },400);
                    }else{
                      $this.switchTab($this.type);
                    }
                };
            },
            methods: {
                init: function() {
                    var $this = this;
                },
                switchTab: function(type) {
                    var $this = this;
                    $this.type = type;
                    $this.frames.forEach(function(item, index) {
                        api.setFrameAttr({
                            name: item.url,
                            hidden: index === type ? false : true
                        });
                    })

                }
            }
        });
    </script>
</body>

</html>
